﻿<%@ Page Language="C#" MasterPageFile="~/admin.master" AutoEventWireup="true" Inherits="MediaMonitor.Admin.Data_Mgmt_Agency"
    Theme="default" Title="Data Management - Agencies" CodeBehind="data-mgmt-agency.aspx.cs" %>

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<asp:Content ID="Content1" ContentPlaceHolderID="Head" runat="Server">
    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">

        <script src="../rad-scripts/rad.js" type="text/javascript"></script>

    </telerik:RadCodeBlock>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Body" runat="Server">
    <div style="padding: 5px; width: 90%;">
        <telerik:RadAjaxPanel ID="radPanel" runat="server" RestoreOriginalRenderDelegate="false">
        <telerik:RadGrid ID="radGrid" runat="server" AllowFilteringByColumn="True" AllowPaging="True"
            AllowSorting="True" GridLines="None" Skin="Hay" OnNeedDataSource="radGrid_NeedDataSource"
            Width="100%" AutoGenerateColumns="false" PageSize="20" GroupingSettings-CaseSensitive="false"
            OnDeleteCommand="radGrid_DeleteCommand">
            <MasterTableView DataKeyNames="AgencyCode">
                <Columns>
                    <telerik:GridButtonColumn Text="Delete" ButtonType="LinkButton" ConfirmText="Are you sure to delete this record?" ConfirmTitle="Delete Confirmation" CommandName="Delete" />

                    <telerik:GridBoundColumn  AutoPostBackOnFilter="true" DataField="AgencyCode" HeaderText="Agency Code" />
                    <telerik:GridBoundColumn  AutoPostBackOnFilter="true" DataField="AgencyName" HeaderText="Agency Name" />
                    <telerik:GridBoundColumn  AutoPostBackOnFilter="true" DataField="ParentAgencyName" HeaderText="Parent Agency" />
                    <telerik:GridBoundColumn  AutoPostBackOnFilter="true" DataField="LastModifiedDate" HeaderText="Last Modified" HtmlEncode="false"
                        DataFormatString="{0:d}" />
                </Columns>
            </MasterTableView>
            
            <ClientSettings>
                <Scrolling AllowScroll="false" />
                <ClientEvents OnFilterMenuShowing="filterMenuShowing" />
            </ClientSettings>
            <FilterMenu OnClientShowing="MenuShowing" />
            
        </telerik:RadGrid>
        </telerik:RadAjaxPanel>
    </div>

</asp:Content>